<template>
  <div>
    <com v-model="id" :data="data"></com>
    <el-button @click="view_click">查看值!</el-button>
  </div>
</template>

<script type="text/ecmascript-6">
import com from "./com"
export default {
  components:{com},
  data: function () {
    return {
      data: ["b", "c"],
      id: "a"
    }
  },

  watch:{
    "id":{
      immediate:true,
      handler(v){
        console.log(v);
      }
    }
  },
  async mounted() {

  },
  methods:{
    view_click(){
      jv.info(this.id)
    }
  }
}
</script>